<?php 
import('@.Model.CommonModel');
class CompanyModel extends Model
{//类定义开始
	protected $_validate	 =	 array(
		array('ccid','require','企业类别必须！'),
		array('cname','require','企业名称必须！'),
		array('username','require','用户名称必须！'),
		array('introduce','require','企业介绍必须！'),

		);

	protected $_auto = array(
		array('status','1','ADD'),
		array('addtime','time','ADD','function'),
	);

	//设定状态
	function setStatus($ids,$status='1') {
		$result = $this->setField('status',$status,"cid in ($ids)");
		if(false===$result){
			return false;
		}else{
			return true;
		}
	}

	//审核
	function check($ids,$status='1') {
		$result = $this->setField('ischeck',$status,"cid in ($ids)");
		if(false===$result){
			return false;
		}else{
			return true;
		}
	}
}//类定义结束
?>